﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Legacy_Calculator__Form_Based_.Forms
{
    public partial class Third : Form
    {
        public Third()
        {
            InitializeComponent();
        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }

        private void Third_Load(object sender, EventArgs e)
        {
            if (Referensi.ApakahAda(LakiLakiPenerimaWarisan.SAUDARA_LAKI_LAKI_KANDUNG) ||
                Referensi.ApakahAda(PerempuanPenerimaWarisan.SAUDARA_PEREMPUAN_KANDUNG))
            {
                chkSaudaraSeayah.Enabled = false;
                chkSaudariSeayah.Enabled = false;
            }

            if (Referensi.ApakahAda(LakiLakiPenerimaWarisan.KAKEK_DARI_AYAH))
            {
                chkSaudaraSeibu.Enabled = false;
                chkSaudariSeibu.Enabled = false;
            }

            txtJumlahSaudaraSeayah.Enabled = chkSaudaraSeayah.Checked;
            txtJumlahSaudariSeayah.Enabled = chkSaudariSeayah.Checked;
            txtJumlahSaudaraSeibu.Enabled = chkSaudaraSeibu.Checked;
            txtJumlahSaudariSeibu.Enabled = chkSaudariSeibu.Checked;
        }

        private void chkSaudaraSeayah_CheckedChanged(object sender, EventArgs e)
        {
            txtJumlahSaudaraSeayah.Enabled = chkSaudaraSeayah.Checked;
        }

        private void chkSaudariSeayah_CheckedChanged(object sender, EventArgs e)
        {
            txtJumlahSaudariSeayah.Enabled = chkSaudariSeayah.Checked;
        }

        private void chkSaudaraSeibu_CheckedChanged(object sender, EventArgs e)
        {
            txtJumlahSaudaraSeibu.Enabled = chkSaudaraSeibu.Checked;
        }

        private void chkSaudariSeibu_CheckedChanged(object sender, EventArgs e)
        {
            txtJumlahSaudariSeibu.Enabled = chkSaudariSeibu.Checked;
        }

        private void btnNext_Click(object sender, EventArgs e)
        {

        }
    }
}
